//
//  FinalTableViewCell.m
//  Arts1
//
//  Created by 孤星晨宇 on 15/10/15.
//  Copyright © 2015年 Arts1. All rights reserved.
//

#import "FinalTableViewCell.h"
#import "AllHeader.h"

@implementation FinalTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _mainLabel = [[UILabel alloc] initWithFrame:self.bounds];
        _mainLabel.textAlignment = NSTextAlignmentCenter;
        _mainLabel.font = [UIFont systemFontOfSize:12];
        _mainLabel.textColor = lFONTCOLOR;
        _mainLabel.userInteractionEnabled = YES;
        [self.contentView addSubview:_mainLabel];
        
        UITapGestureRecognizer *tapGuesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(setPrivateMessage:)];
        
        [_mainLabel addGestureRecognizer:tapGuesture];
    }
    return self;
}

- (void)setFinal:(NSString *)final{
    _final = final;
    _mainLabel.text = _final;
}

- (void)setPrivateMessage:(UITapGestureRecognizer *)sender{
    if (_finishMessageBlock) {
        _finishMessageBlock();
    }
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
